import java.util.Scanner;

public class 邮箱验证{
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        String emailMatcher="[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";
        if(str.matches(emailMatcher)){
            System.out.print("邮箱格式合法");
        }
        else{
            System.out.print("邮箱格式不合法");
        }


    }
    //write your code here......


}